package com.upload.repository;

import com.upload.domain.Document;
import com.upload.enums.Status;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by STARF on 2017/3/21.
 */
@Repository
public interface DocumentRepository extends JpaRepository<Document, Long> {

    //文件名是否已存在
    int countByFileName(String fileName);

    //未审核记录
    List<Document> findByStatus(Status status);

    List<Document> findByUploadUnionid(String uploadUnionid);

    //文件摘要是否存在
    int countByMd5(String md5);

}
